﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Text;
using System.Collections;
using System.Text.RegularExpressions;

public partial class testt : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string domain = URL.getDomain(Request.Url.ToString());
        string domainSuf = URL.getDomainSuf(domain);
        string directory = "";
        if (Request.QueryString != null && Request.QueryString["flag"] != null)
        {
            directory = Request.QueryString["flag"];
        }
        else
        {
            directory = "main";
        }
        Response.Write(WmlData.buildJsonTWml(domainSuf, directory));
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        string name = "",link = "", note = "";
        int i = 0, t = 0;
        string a = TextBox1.Text;
        i = a.IndexOf('\n');
        string aItem = a.Substring(0, i);
        Regex reg = new Regex(@"<a\s*[^>]*>([\s\S]+?)</a>", RegexOptions.IgnoreCase);
        Match m = reg.Match(aItem);
        a = a.Substring(i + 1, a.Length-i-1);
        t = aItem.IndexOf('\r');
        
    }
}